home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 001 / qmsstins.arc / UPCP1.SCR < prev    next >
Text File  |  1987-09-20  |  5KB  |  271 lines

  1. debug off
  2. ;JTL 9-17-87 23:45pm
  3. getscr
  4. clrscr
  5. colorfg 15
  6. box 6 1 75 13
  7. colorfg 14
  8.  
  9. note
  10. display ' ****-'
  11. colorfg 13
  12. colorbg 1
  13. display 'Multiple'
  14. colorfg 14
  15. colorbg 0
  16. display '-File Upload/Logoff  PCBoard V11/12.0  Qmodem3.1-****'
  17. colorfg 15
  18. Note
  19. Note Instructions:
  20. colorfg 6
  21. Note     Enter a filename to be uploaded after each prompt.
  22. Note     Maximum of TEN (10) filenames can be entered.
  23. Note     A blank <CR> entry starts the transfers.
  24. colorfg 7
  25. Note     Invalid or Existing Filenames will be Automatically bypassed.
  26. Note
  27. string login transfer logend dirpath correct cnt file cownt count cwnt kount
  28. string desc
  29. getlog:
  30. colorfg 6
  31. display "    Select Auto-Logoff after File Transfers [Y]es or [N]o ? > "
  32. colorfg 15
  33. inkey login
  34. displayln '$login'
  35. if '$login' =  'N'  nlog
  36. if '$login' =  'Y'  ylog
  37. goto getlog
  38. nlog:
  39. assign logend "done"
  40. goto home
  41. ylog:
  42. assign logend "logoff"
  43.  
  44. home:
  45. colorfg 6
  46. display '    Select Upload Protocol [X,C,I,Y,G,Z <Q>=Quit] > '
  47. colorfg 15
  48. inkey 9
  49. displayln '$9'
  50. if '$9' =  'X'  menu
  51. if '$9' =  'C'  menu
  52. if '$9' =  'I'  menu
  53. if '$9' =  'Y'  menu
  54. if '$9' =  'G'  menu
  55. if '$9' =  'Z'  menu
  56. if '$9' =  'Q'   done
  57. goto home
  58.  
  59. menu:
  60. selpath:
  61. colorfg 3
  62. Note     Enter Upload Drive:\Path   DO NOT use a "\" to end the Path.
  63. colorfg 6
  64. display '    Drive:\Path > '
  65. colorfg 15
  66. get dirpath 45
  67. if '$dirpath' = '' selpath
  68. CHDIR $dirpath\
  69. IF $SUCCESS valid
  70. CHDIR $dirpath
  71. IF $SUCCESS valid
  72. colorfg 12
  73. displayln "    Path is Invalid, Re-enter."
  74. colorfg 6
  75. goto selpath
  76. valid:
  77. colorfg 2
  78. display "    Path is Valid."
  79. colorfg 6
  80. display ' Is Path Correct [Y]es or [N]o ? <CR>=Yes] > '
  81. colorfg 15
  82. inkey correct
  83. displayln '$correct'
  84. if '$correct' = 'Y'  getone
  85. if '$correct' = 'N'  selpath
  86.  
  87. getone:
  88. colorfg 2
  89. assign cwnt 0  ;actual file counter
  90. assign cnt 1   ;visual file counter
  91. colorfg 2
  92. display '          File # $cnt > '
  93. colorfg 3
  94. get file 12
  95. if  '$file' =  ''  $logend
  96. goto okfile
  97. nextone:
  98. colorfg 2
  99. display '          File # $cnt > '
  100. colorfg 3
  101. get file 12
  102. okfile:
  103. exist $dirpath\$file desc1
  104. colorfg 4
  105. if '$file' = '' go
  106. note           File Not Found, enter another name or <CR> to Abort.
  107. goto nextone
  108. desc1:
  109. colorfg 4
  110. display 'Desc. 45 Char Max. > '
  111. colorfg 5
  112. get desc 45
  113. if '$desc' =  '' desc1
  114. push '$file'
  115. push '$desc'
  116. incr cnt
  117. incr cwnt
  118. if '$cnt' = '11' go
  119. goto nextone
  120.  
  121. go:
  122. colorfg 7
  123. gotoxy 1 13
  124. note
  125. display '    Online with: '
  126. colorbg 2
  127. colorfg 15
  128. display ' $board '
  129. colorbg 0
  130. colorfg 7
  131. display ' '
  132. colorbg 4
  133. colorfg 15
  134. display '[$9]'
  135. colorbg 0
  136. colorfg 7
  137. displayln ' Protocol '
  138. colorfg 10
  139. display '    $cwnt'
  140. colorfg 7
  141. if '$cwnt' = '1' one
  142. display ' Files will be Uploaded in Reverse order from: '
  143. goto skip
  144. one:
  145. display ' File will be Uploaded '
  146. goto cont
  147. skip:
  148. colorbg 2
  149. colorfg 15
  150. display ' $cwnt to 1 '
  151. colorbg 0
  152. colorfg 7
  153. cont:
  154. colorbg 0
  155. displayln ' '
  156. display ' '
  157. colorfg 0
  158. colorbg 6
  159. display "====================[ Online Text Area Below ]===================="
  160. colorbg 0
  161. colorfg 12
  162. box 1,14,80,$last_row   ;window can be used instead
  163. clrscr
  164. colorfg 3
  165. timeout 60 $logend
  166. assign cownt $cnt
  167.  
  168. start:
  169. assign kount $cnt ;upload file counter in window
  170. next:
  171. send "{"
  172. colorfg 3
  173. WAITFOR "Command?"
  174. next1:
  175. pause 1000
  176. decr kount
  177. when
  178. pop desc
  179. pop file
  180. if '$file' = '' $logend
  181. when "board file" next1
  182. when "Not Accepted" start
  183. SEND  "u $file $9{"
  184. waitfor  "description"
  185. pause 1000
  186. send  "$desc{"
  187. pause 5500
  188. colorfg 6
  189. note     Wait Several Seconds for Upload to Begin
  190. colorfg 3
  191. pause 500
  192. gotoxy 1 40
  193. displayln ' '
  194. display '                                                                    '
  195. colorbg 2
  196. colorfg 15
  197. display 'File # $kount'
  198. colorbg 0
  199. colorfg 3
  200. displayln ' '
  201. if $offline discon   ;use semicolon in front for offline testing
  202. UPLD $dirpath\$file $9
  203. if $offline discon   ;use semicolon in front for offline testing
  204. pause 5000    ;for zmodem only so 00 is not accepted
  205. decr cownt
  206. when
  207. if '$9' = 'z' tones
  208. goto next
  209.  
  210. tones:
  211. beep 800
  212. beep 600
  213. beep 400
  214. goto next
  215.  
  216. discon:
  217. colorfg 10
  218. putscr
  219. gotoxy 25 12
  220. displayln 'Line Disconnect has Occurred......'
  221. exit
  222.  
  223. done:
  224. send "{"
  225. colorfg 10
  226. putscr
  227. exit
  228.  
  229. logoff:
  230. putscr
  231. clrscr
  232. when
  233. when "Command?" logout
  234. send "{"
  235. waitfor "Command?"
  236.  
  237. logout:
  238. pause 4500
  239. clrscr
  240. colorfg 6
  241. note
  242. note            Auto Logoff was Previously Selected.
  243. colorfg 15
  244. note
  245. note            PRESS [Esc] then [Y] to Abort the Logoff.
  246. colorfg 10
  247. assign 0 $wherex
  248. assign 1 $wherey
  249. assign cnt 9
  250. tmout:
  251. gotoxy $0 $1
  252. display '           $cnt  Seconds to Auto Logoff.
  253. pause 200
  254. if '$cnt' = '2' bye
  255. decr cnt
  256. goto tmout
  257. bye:
  258. gotoxy $0 $1
  259. display '           1  Second  to Auto Logoff.
  260. pause 200
  261. colorfg 15
  262. note            Auto-Logoff Completed.
  263. colorfg 10
  264. send "g{"
  265. pause 5000
  266. Hangup
  267. exit
  268.  
  269.  
  270.  
  271.